import request  from "@/utils/request.js"

export const activelistServer = (params) =>{
    return request.get('/active/list',{params:params})
}

export const addactiveServer = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.post('/active/add',params)
}

export const updataactiveServer = (addData) =>{
    const params = new URLSearchParams();
    for (let key in addData){
          params.append(key,addData[key]);
    }
    return request.put('/active/update',params)
}

export const delactiveServer = (id) =>{
    return request.delete('/active/del/'+id)
}

export const alistServer = () =>{
    return request.get('/active/lista')
}